package program;

import java.util.*;

public class Station {

	private ArrayList<Track> listOfTracks = new ArrayList<Track>();
	private String name;
	
	//Constructor
	public Station(String Name) {
		if(Name==null){
			throw new IllegalArgumentException("Name cannot be null");
		}
		name=Name;
	}

	//return list of tracks attached to station
	public ArrayList<Track> getTracks(){
		return listOfTracks;
	}

	//Return name of station
	public String getName(){
		return name;
	}
	
	public void setName(String Name){
		if(Name==null){
			throw new IllegalArgumentException("Name cannot be null");
		}	
		name = Name;
	}
	
	public void addTrack(Track t){
		listOfTracks.add(t);
	}
}
